// OGLCtrlImp.cpp : implementation file
//

#include "stdafx.h"
#include "WorldBuilder.h"
#include "Line.h"
#include "Seg.h"
#include "Ray.h"

Line::Line(const gx::Vec3 & o, const gx::Vec3 & d)
: origin(o), direction(d)
{
}

gx::Vec3 Line::proj_pnt(const gx::Vec3 & p) const
{
	return origin + direction.dot(p - origin) * direction;
}


//
